package com.itheima.reggie.entity;

import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * C端用户实体类
 * @Author Vsunks.v
 * @Blog blog.sunxiaowei.net/996.mba
 * @Description:
 */
@Data
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long id;

    /** 姓名*/
    private String name;

    /** 手机号 */
    @NotNull(message = "用户手机号不能为空")
    @Pattern(regexp = "1[356789][0-9]{9}",message = "手机号不合法")
    private String phone;

    /** 性别 0 女 1 男 */
    private String sex;

    /** 身份证号 */
    private String idNumber;

    /** 头像 */
    private String avatar;

    /** 状态 0:禁用，1:正常 */
    private Integer status;
}
